Therapy adjustment

ABSTRACT

Systems and methods for adjusting a therapy delivered to a patient include detecting a value of at least one sensed patient parameter and adjusting a therapy program to accommodate different patient parameter values. A data structure including a plurality of patient parameter values and associated therapy programs may be stored within a medical device or a programming device. Upon detecting a patient parameter value, an associated therapy program from the data structure may be selected. If no therapy program is associated with the detected patient parameter value, an intermediate program that best suits the detected patient parameter value may be generated by interpolating between the most recently implemented therapy program and a stored therapy program. In some embodiments, the rate of shifting between parameters of two stored or interpolated therapy programs may be based on the rate of change of the patient parameter value over time.

TECHNICAL FIELD

The invention relates to medical devices, and more particularly, medicaldevices that deliver therapy.

BACKGROUND

A variety of types of medical devices are used for chronic, e.g.,long-term, provision of therapy to patients. As examples, pulsegenerators are used for chronic provision of cardiac pacing andneurostimulation therapies, and pumps are used for chronic delivery oftherapeutic agents, such as drugs. Typically, such devices providetherapy continuously or periodically according to parameters, e.g., aprogram comprising respective values for each of a plurality ofparameters, specified by a clinician.

In some cases, a medical device may be deliver therapy according to oneof a plurality of stored therapy programs. Selections may be made fromamong the plurality of programs to accommodate different physiologicalconditions of the patient. For example, the symptoms, e.g., theintensity of pain, of patients who receive spinal cord stimulation (SCS)therapy may vary over time based on the activity level or posture of thepatient, the specific activity undertaken by the patient, or the like.Accordingly, different therapy programs may be delivered at differenttimes, depending on the patient activity level or posture.

SUMMARY

In general, the invention is directed to techniques for detecting avalue of a sensed patient parameter and adjusting a therapy program toaccommodate different patient parameter values. In some cases, sometherapy programs may be more effective for a particular patientparameter value than other therapy programs. The present disclosureprovides techniques for adjusting at least one therapy parameter as avalue of a sensed patient parameter changes in order to provide moreefficacious therapy for different sensed patient parameter values, suchas different patient postures or activity levels. In some embodiments,the patient parameter value may be monitored continuously orsubstantially continuously, and the therapy parameter may be adjusted asthe patient parameter value changes.

Rather than storing an inordinate number of programs for each possiblepatient parameter value, a limited number of therapy programs are storedand associated with a limited number of patient parameter values. If asensed patient parameter value is not associated with a stored therapyprogram, a processor of a medical device, programming device or anothercomputing device implements an algorithm to interpolate between twostored therapy programs to temporarily create a therapy program thatprovides efficacious therapy for the sensed patient parameter value. Inother embodiments, the sensed patient parameter value may be associatedwith a stored therapy program, and the processor may interpolate betweentwo stored therapy programs to transition therapy delivery according totherapy parameters of a first stored therapy program to therapyparameters according to a second stored therapy program.

In accordance with one embodiment, different therapy programs andassociated patient postures are stored within an implantable medicaldevice (IMD). Each therapy program may define one or more therapyparameters such as electrode combinations by which electricalstimulation therapy is delivered, voltage or current amplitude, pulsewidth or pulse frequency of electrical stimulation, stimulation cycling(e.g., on/off times of an electrical stimulator) or frequency or dosageof drug delivery. When a patient is in a first posture, therapy isdelivered according to a first therapy program. A sensor within the IMDor coupled to the IMD (e.g., via wired or wireless communication)detects a change in patient posture. When the sensor senses a secondposture of the patient, the IMD may determine whether one of the storedtherapy programs is associated with the second posture. If the secondposture is associated with a stored therapy program, the IMD implementsthe associated therapy program. In some embodiments, rather thanabruptly changing the therapy delivery via a therapy program associatedwith a first posture to the therapy program associated with the secondposture, IMD may implement an algorithm to create at least one“intermediate” therapy program to gradually adjust therapy between thetherapy programs. In one embodiment, one or more intermediate therapyprograms are determined by interpolating between the parameters in thefirst and second therapy programs. The interpolation algorithm may belinear or nonlinear. In one embodiment, the rate of change between thefirst and second therapy programs is based on the rate of change of thepatient's movement between the first and second postures.

If no therapy program is associated with the second posture, the IMD mayimplement an algorithm to interpolate between the therapy programassociated with the first posture and a therapy program associated witha posture that is closest to the second posture. Again, the algorithmmay be linear or nonlinear. In this way, the IMD may create a therapyprogram for the second posture. The rate of change of adjustment oftherapy from the first therapy program associated with the first postureto the interpolated program may also be dictated by the rate of changeof the patient's movement between the first and second postures, or therate of change of another patient parameter value that is associatedwith the therapy programs.

In embodiments, the rate of adjusting between a first therapy programand a second therapy program, or one or more therapy parameters of thefirst and second therapy programs, may be based on the rate of change ofthe patient parameter value. The first and second therapy program may beany therapy programs, and are not necessarily limited to stored therapyprograms or interpolated therapy programs. In one embodiment, the timerate of change of a patient parameter is used to determine the rate ofadjusting between two therapy programs. In another embodiment, the timerate of change of two or more patient parameter values are used todetermine the rate of adjustment.

In one embodiment, the invention is directed to a method comprisingsensing a first value of a parameter of a patient, delivering therapy tothe patient according to a first therapy program associated with thefirst value of the patient parameter, detecting a change from the firstvalue of the patient parameter to a second value of the patientparameter, determining a first rate of the change from the first valueto the second value of the patient parameter, identifying a secondtherapy program based on the second value of the patient parameter, andadjusting the delivery of the therapy to the patient from the firsttherapy program to the second therapy program at a second rate based onthe first rate of the change.

In another embodiment, the invention is directed to a system comprisinga medical device that is configured to deliver a therapy to a patient, asensor that is configured to sense a parameter of the patient, a memorythat stores a data structure comprising a plurality of values of thepatient parameter and associated therapy programs, wherein the therapyprograms each comprise at least one therapy parameter, and a processor.The processor controls the medical device to deliver the therapy to thepatient according to a first therapy program associated with a firstvalue of a patient parameter detected via the sensor, detect a changefrom the first value of the patient parameter to a second value of thepatient parameter, determine a first rate of the change from the firstvalue to the second value of the patient parameter, identify a secondtherapy program associated with the second value of the patientparameter via the data structure stored within the memory, and controlthe medical device to adjust the delivery of the therapy to the patientfrom the first therapy program to the second therapy program at a secondrate based on the first rate.

In another embodiment, the invention is directed to a computer-readablemedium containing instructions. The instructions cause a processor toreceive input indicating a first value a sensed parameter of a patient,identify a first therapy program associated with the first value of thepatient parameter, deliver therapy to the patient according to the firsttherapy program, detect a change from the first value of the patientparameter to a second value of the patient parameter, determine a firstrate of change from the first value to the second value of the patientparameter, identify a second therapy program associated with the secondvalue of the patient parameter, and adjust the delivery of the therapyto the patient from the first therapy program to the second therapyprogram at a second rate based on the first rate of the change.

In another embodiment, the invention is directed to a method comprisingsensing a first value of a parameter of a patient, delivering therapy tothe patient according to a first therapy program associated with thefirst value of the patient parameter in a data structure comprising aplurality of patient parameter values and associated therapy programs,detecting a change from the first value of the patient parameter to asecond value of the patient parameter, identifying a third value of thepatient parameter within the data structure that is closest to thesecond value of the patient parameter, where the third value of thepatient parameter is associated with a second therapy program within thedata structure, and generating an intermediate therapy program byinterpolating at least one therapy parameter between therapy parametersof the first and second therapy programs.

In another embodiment, the invention is directed to a system comprisinga medical device that is configured to deliver a therapy to a patient, asensor that is configured to sense a patient parameter of the patient, amemory that stores a data structure comprising a plurality of patientparameter values and associated therapy programs, where the therapyprograms each comprise at least one therapy parameter, and a processor.The processor controls the medical device to deliver the therapy to thepatient according to a first therapy program associated with a firstvalue of the patient parameter detected via the sensor, detect a changein the first value to a second value of the patient parameter detectedvia the sensor, identify a third value patient parameter within the datastructure that is closest to the second value, wherein the third valueis associated with a second therapy program within the data structure,and interpolate at least one therapy parameter between therapyparameters of the first and second therapy programs to generate anintermediate therapy program.

In another embodiment, the invention is directed to a computer-readablemedium containing instructions. The instructions cause a processor tocontrol a therapy delivery device to receive input indicating a sensedparameter of a patient, associate a first value of the patient parameterwith a first therapy program by referencing a data structure comprisinga plurality of patient parameter values and associated therapy programs,deliver therapy to the patient according to the first therapy program,detect a change from the first value of the patient parameter to asecond value of the patient parameter, identify a third value of thepatient parameter within the data structure that is closest to thesecond value, wherein the third value is associated with a secondtherapy program within the data structure, and generate an intermediatetherapy program by interpolating at least one therapy parameter betweentherapy parameters of the first and second therapy programs.

The details of one or more embodiments of the invention are set forth inthe accompanying drawings and the description below. Other features,objects, and advantages of the invention will be apparent from thedescription and drawings, and from the claims.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a conceptual diagram illustrating an example system thatfacilitates closed-loop therapy adjustment according to the invention.

FIG. 2 is a block diagram illustrating the implantable medical device ofFIG. 1 in greater detail.

FIG. 3 is a block diagram illustrating an exemplary configuration of amemory of the implantable medical device of FIG. 2.

FIG. 4 is a block diagram of one embodiment of the programming device ofthe system shown in FIG. 1.

FIG. 5 illustrates an example patient parameter value table that may beused for closed-loop adjustment of therapy.

FIG. 6 is a flow chart illustrating an example of a technique that aprocessor of an implantable medical device may employ to interpolatebetween two therapy programs.

FIGS. 7A-7C illustrate an embodiment of a technique for interpolating anelectrode combination between electrode combinations of two therapyprograms.

FIG. 8 is a flow diagram illustrating an embodiment of a technique fordetermining a rate for adjusting therapy delivery between the therapyparameters of two therapy programs.

FIG. 9 is a flow diagram illustrating an example technique fordelivering therapy according to a stored or intermediate therapy programor a predetermined default based on whether sensed patient parametervalues are stable or transient.

FIG. 10 is a schematic diagram of embodiments of external activitysensing devices that may be used to determine a patient parameter value.

DETAILED DESCRIPTION

FIG. 1 is a conceptual diagram illustrating an example system 10 thatfacilitates closed-loop therapy adjustment according to the invention.In the illustrated example, system 10 includes an IMD 12, which isimplanted within a patient 14, and delivers electrical stimulationtherapy to patient 14. In exemplary embodiments, IMD 12 takes the formof an implantable signal generator, and delivers electrical stimulationtherapy to patient 14 in the form of a programmable stimulation signal(e.g., in the form of electrical pulses or substantially continuous-timesignals).

IMD 12 delivers electrical stimulation therapy to patient 14 via leads16A and 16B (collectively “leads 16”), and more particularly, via one ormore stimulation electrodes carried by leads 16. Leads 16 may also carryone or more sensing electrodes. Leads 16 may, as shown in FIG. 1, beimplanted proximate to the spinal cord 18 of patient 14, and IMD 12 maydeliver spinal cord stimulation (SCS) therapy to patient 14 in order to,for example, reduce pain experienced by patient 14. However, theinvention is not limited to the configuration of leads 16 shown in FIG.1 or the delivery of SCS therapy. For example, one or more leads 16 mayextend from IMD 12 to the brain (not shown) of patient 14, and IMD 12may deliver deep brain stimulation (DBS) therapy to patient 14 to, forexample, treat tremor, Parkinson's disease, epilepsy or other movementdisorders or other neurological disorders. As further examples, one ormore leads 16 may be implanted proximate to the pelvic nerves (notshown), stomach (not shown), or sexual organs (not shown) and IMD 12 maydeliver electrical stimulation therapy to treat urinary or fecalincontinence, gastroparesis, sexual dysfunction, peripheral neuropathy,post-operative pain mitigation, ilioinguinal nerve stimulation,intercostal nerve stimulation, gastric stimulation for the treatment ofgastric mobility disorders and obesity or muscle stimulation (e.g.,functional electrical stimulation (FES) of muscles).

Further, as discussed above, the invention is not limited to embodimentsin which IMD 12 delivers stimulation therapy. For example, in someembodiments, IMD 12 may additionally or alternatively be coupled to oneor more catheters to deliver one or more therapeutic substances topatient 14, e.g., one or more drugs. Additionally, the invention is notlimited to implanted devices. Any implantable or external medical devicemay deliver closed-loop therapy according to the techniques of theinvention.

IMD 12 includes a sensor that is configured to sense at least onepatient parameter. The patient parameter may include parameters that mayaffect the efficacy of therapy or indicate a parameter that affects theefficacy of therapy, e.g., activity, activity level, posture, or aphysiological parameter of patient 14. Physiological parameters mayinclude heart rate, respiration rate, respiratory volume, coretemperature, blood pressure, blood oxygen saturation, partial pressureof oxygen within blood, partial pressure of oxygen within cerebrospinalfluid, muscular activity, arterial blood flow, electromyogram (EMG), anelectroencephalogram (EEG), an electrocardiogram (ECG) or galvanic skinresponse. In other embodiments, a sensor used to sense such patientparameters may be implanted at a site within patient 14 or worn on theexterior of the patient, in which case the sensor may be coupled to IMD12. An example sensor is a 3-axis accelerometer located within IMD 12.Patient parameter values detected by IMD 12 based on the signalsgenerated by such a sensor may correspond to an activity or postureundertaken by patient 14, or a gross level of physical activity, e.g.,activity counts based on footfalls or the like. For example, IMD 12 mayassociate the signal generated by a 3-axis accelerometer or multiplesingle-axis accelerometers (or a combination of a three-axis andsingle-axis accelerometers) with a patient posture, such as sitting,recumbent, upright, and so forth.

In exemplary embodiments, IMD 12 delivers therapy according to a therapyprogram selected from two or more stored therapy programs, or anintermediate therapy program generated by interpolating between twotherapy programs, where at least one is a stored therapy program. Inparticular, IMD 12 may select a therapy program or interpolate betweentwo stored therapy programs based on the value of a sensed patientparameter. Different therapy programs may provide efficacious therapyfor different physiological conditions of the patient. For example, thesymptoms, e.g., the intensity of pain, of patients who receive spinalcord stimulation (SCS) therapy may vary over time based on the activitylevel or posture of the patient, the specific activity undertaken by thepatient, or the like. Accordingly, IMD 12 may select different therapyprograms for delivery at different times, depending on a sensed patientparameter value, which may be, for example, the patient activity levelor posture of patient 14.

A therapy program may be defined by a set of one or more therapyparameters that define an aspect of the therapy delivered by IMD 12. Forexample, a program that controls delivery of stimulation by IMD 12 inthe form of pulses may define a voltage or current pulse amplitude, arate of an amplitude change (e.g., ramping up or down of stimulationamplitudes), a pulse width, a pulse rate, for stimulation pulsesdelivered by IMD 12, a cycle of stimulation delivery (e.g., a timing ofwhen IMD 12 is in an on mode or an off/sleep mode) and so forth.Further, each of leads 16 includes electrodes (not shown in FIG. 1), andthe parameters for a program that controls delivery of stimulationtherapy by IMD 12 may include information identifying which electrodeshave been selected for delivery of pulses according to the program, andthe polarities of the selected electrodes, i.e., the electrodeconfiguration for the program. In addition, a therapy parameter mayinclude the particular pattern and/or locations of anodes and cathodesof the electrodes of leads 16 (the “electrode combination”). Programsthat control delivery of other therapies by IMD 12 may include otherparameters. For example, a program that controls delivery of a drug orother therapeutic agent may include a titration rate or informationcontrolling the timing (e.g., frequency) of bolus deliveries.

In exemplary embodiments, IMD 12 stores the therapy programs as aplurality of records that are stored in a table or other data structurethat may be continually updated as IMD 12 “learns” associations oftherapy information with patient parameter values. Techniques forgenerating and updating the records within the table or other datastructure are described in commonly-assigned U.S. Patent ApplicationPublication No. 2007/0129774, entitled, “CLOSED-LOOP THERAPY ADJUSTMENT”and filed on Apr. 28, 2006, commonly-assigned U.S. Patent ApplicationPublication No. 2007/0150029, entitled, “CLOSED-LOOP THERAPY ADJUSTMENT”and filed on Dec. 1, 2006, and commonly-assigned U.S. Patent ApplicationPublication No. 2007/0150026, entitled, “CLOSED-LOOP THERAPY ADJUSTMENT”and filed on Dec. 1, 2006, each of which is incorporated herein byreference in its entirety. While the remainder of the disclosure refersprimarily to tables, the present invention also applies to other typesof data structures that store therapy programs and associatedphysiological parameters.

As described below with reference to FIG. 5, each record within a tablestored within IMD 12 includes at least one patient parameter value andassociated therapy information. The therapy information may define oneor more therapy parameter values, absolute or percentage adjustments forone or more therapy parameters or a complete therapy program that IMD 12implements to deliver therapy to patient 14. As described in furtherdetail below, when IMD 12 detects a value of a patient parameter, IMD 12may adjust the therapy delivery based on the therapy information in therecords of the table. For example, upon determining a patient parametervalue, IMD 12 may locate the record in the stored table including thepatient parameter value and deliver therapy according to the therapyprogram associated with the patient parameter value. Alternatively, IMD12 may interpolate between two therapy programs if the table does notinclude any records that associate the particular patient parametervalue with a therapy program. As described in further detail below, therate at which IMD 12 adjusts therapy delivery between two or moretherapy programs may be determined based on a rate of change of one ormore patient parameter values, such as a rate of change between thepatient parameter values with which the programs are associated.

In the illustrated example, system 10 also includes a programming device20, which may, as shown in FIG. 1, be a handheld computing device.Programming device 20 allows a user to interact with IMD 12. Programmingdevice 20 may, for example, communicate via wireless communication withIMD 12 using radio-frequency (RF) telemetry techniques, or any othertechniques known in the art. Programming device 20 may, as shown in FIG.1, include a display 22 and a keypad 24 to allow the user to interactwith programming device 20. In some embodiments, display 22 may be atouch screen display, and the user may interact with programming device20 via display 22. The user may also interact with programming device 20using peripheral pointing devices, such as a stylus or mouse. Keypad 24may take the form of an alphanumeric keypad or a reduced set of keysassociated with particular functions. In some embodiments, keypad 24 mayinclude an increase amplitude button and a decrease amplitude button todirectly adjust stimulation amplitude.

In some embodiments, programming device 20 is a patient programmer usedby patient 14 to control the delivery of neurostimulation therapy by IMD12. Patient 14 may use programming device 20 to activate or deactivate,e.g., start or stop, neurostimulation therapy. Patient 14 may also useprogramming device 20 to adjust the therapy. For example, when IMD 12 isin one mode, a patient may use programming device 20 to manually selectone or more programs from among a plurality of stored programs to be thecurrent programs used by IMD 12 to deliver therapy, e.g., patient 14 mayswitch from one program to another using programming device 20. Further,patient 14 may also use programming device 20 to adjust therapy byadjusting one or more stimulation parameters, e.g., adjust theamplitude, width, or rate of delivered stimulation pulse, for the one ormore current programs. However, as described herein, in another mode,IMD 12 is programmed to automatically select a therapy program from aplurality of stored programs or interpolate between the stored programsbased on a sensed patient parameter value.

In some embodiments, the table of therapy programs and associatedpatient parameter values may be maintained by and/or stored withinprogramming device 20 instead of IMD 12. Accordingly, one or both of IMD12 and programming device 20 may provide closed-loop adjustment of thetherapy delivered by IMD 12 according to the invention. In embodimentsin which programming device 20 maintains the table, programming device20 may include sensors that sense the patient parameter, or may receivevalues of the patient parameter from IMD 12 or another implanted orexternal sensor. After selecting a program or generating an intermediateprogram by interpolating between the therapy parameters of two therapyprograms based on a sensed patient parameter value, programming device20 may send commands to IMD 12 based on therapy information stored inthe table to implement closed-loop delivery of therapy.

For ease of description, the provision of closed-loop therapy adjustmentwill be described hereinafter primarily with reference to embodiments inwhich IMD 12 provides the closed-loop therapy adjustments. However, itis understood that both of IMD 12 and programming device 20 are medicaldevices capable of providing closed-loop therapy adjustments accordingto the invention.

FIG. 2 is a block diagram illustrating IMD 12 in greater detail. IMD 12is coupled to leads 16A, 16B, which include electrodes 30A-H and 31A-H,respectively. IMD 12 may be coupled to leads 16A, 16B either directly orindirectly via a lead extension. IMD 12 includes therapy module 32,processor 34, memory 36, telemetry module 38, sensor 40, and powersource 41.

IMD 12 may deliver neurostimulation therapy via electrodes 30A-H of lead16A and electrodes 31A-H of lead 16B (collectively “electrodes 30 and31”). In the embodiment shown in FIG. 2, implantable medical leads 16Aand 16B are cylindrical. In other embodiments, leads 16A and 16B may be,at least in part, paddle-shaped (i.e., a “paddle” lead). In someembodiments, electrodes 30, 31 may be ring electrodes. In otherembodiments, electrodes 30, 31 may be segmented or partial ringelectrodes, each of which extends along an arc less than 360 degrees(e.g., 90-120 degrees) around the outer perimeter of the respective lead16A, 16B. The configuration, type, and number of electrodes 30, 31illustrated in FIG. 2 are merely exemplary. For example, IMD 12 may becoupled to one lead with eight electrodes on the lead or to three leadswith the aid of a bifurcated lead extension.

Electrodes 30, 31 are electrically coupled to a therapy module 32 of IMD12 via conductors within the respective leads 16A, 16B. Each ofelectrodes 30, 31 may be coupled to separate conductors so thatelectrodes 30, 31 may be individually selected, or in some embodiments,two or more electrodes 30 and/or two or more electrodes 31 may becoupled to a common conductor. In one embodiment, an implantable signalgenerator or other stimulation circuitry within therapy module 32delivers electrical signals (e.g., pulses or substantiallycontinuous-time signals, such as sinusoidal signals) to a target tissuesite within patient 14 via at least some of electrodes 30, 31 under thecontrol of processor 34. The stimulation energy generated by therapymodule 32 may be delivered from therapy module 32 to selected electrodes30, 31 via a switch matrix and conductors carried by leads 16, ascontrolled by processor 34.

Processor 34 may include any one or more of a microprocessor, acontroller, a digital signal processor (DSP), an application specificintegrated circuit (ASIC), a field programmable gate array (FPGA),discrete logic circuitry, or the like. Processor 34 controls theimplantable signal generator within therapy module 32 to deliverelectrical stimulation therapy according to selected therapy parameters.Specifically, processor 34 controls therapy module 32 to deliverelectrical signals with selected voltage or current amplitudes, pulsewidths (if applicable), and rates specified by the stimulationparameters (i.e., therapy parameters). The therapy parameters may bedefined as part of a therapy program. In addition, processor 34 may alsocontrol therapy module 32 to deliver the electrical stimulation signalsvia selected subsets of electrodes 30, 31 with selected polarities. Forexample, electrodes 30, 31 may be combined in various bipolar ormulti-polar combinations to deliver stimulation energy to selectedsites, such as nerve sites adjacent the spinal column, pelvic floornerve sites or cranial nerve sites. The above-mentioned switch matrixmay be controlled by processor 34 to configure electrodes 30, 31 inaccordance with a therapy program.

IMD 12 also includes a memory 36, which may include any volatile,non-volatile, magnetic, optical, or electrical media, such as a randomaccess memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM),electrically-erasable programmable ROM (EEPROM), flash memory, and thelike. Memory 36 may store program instructions that, when executed byprocessor 34, cause IMD 12 to perform the functions ascribed to IMD 12herein. Memory 36 may also store a table of therapy programs (e.g., thetherapy parameters of each therapy program) and associated patientparameter values.

In some embodiments, processor 34 maintains, e.g., creates and modifies,the table stored in memory 36. For example, in some embodiments,processor 34 maintains the table in accordance with the techniquesdescribed in commonly-assigned U.S. Patent Application Publication No.2007/0129774, entitled, “CLOSED-LOOP THERAPY ADJUSTMENT” and filed onApr. 28, 2006, U.S. Patent Application Publication No. 2007/0150029,entitled, “CLOSED-LOOP THERAPY ADJUSTMENT” and filed on Dec. 1, 2006,and U.S. Patent Application Publication No. 2007/0150026, entitled,“CLOSED-LOOP THERAPY ADJUSTMENT” and filed on Dec. 1, 2006.

IMD 12 includes a sensor 40 that senses one or more patient parameters.Processor 34 detects values of the patient parameter based on the signalgenerated by sensor 40 as a function of the patient parameter. Sensor 40may be a sensor that generates an output, such as an electrical signal,based on activity, activity level, posture, and/or one or morephysiological parameters of patient 14, as discussed above. In someembodiments, processor 34 receive the electrical signal from sensor anddetermines a parameter value from the signal. In exemplary embodiments,sensor 40 is a 3-axis accelerometer, such as a piezoelectric and/ormicro-electro-mechanical accelerometer. In other embodiments, a singleaxis accelerometer may be employed, or multiple single axisaccelerometers may be used in place of one 3-axis accelerometer.

In some embodiments, processor 34 processes the analog output of sensor40 to determine digital activity and/or posture information. Forexample, where sensor 40 comprises a piezoelectric accelerometer,processor 34 may process the raw signal provided by sensor 40 todetermine activity counts, whereby the table of therapy informationstored within memory 36 associates a therapy program with a number ofactivity counts. In some embodiments, IMD 12 includes one or moresensors oriented along various axes, or sensor 40 comprises a singlemulti-axis, e.g., three-axis, accelerometer. In such embodiments,processor 34 may process the signals provided by the one or more sensors40 to determine velocity of motion information for each axis.

In other embodiments, IMD 12 may include an ultrasonic transducer on atleast one of leads 16A, 16B to detect movement relative to a targettissue site. An example of a technique for detecting relative movementbetween a target tissue site and at least one of leads 16A, 16B isprovided in commonly-assigned U.S. Pat. No. 7,406,351, entitled,“ACTIVITY SENSING FOR STIMULATOR CONTROL,” and issued on Jul. 29, 2008.As previously described, the movement of leads 16A, 16B within patient14 may affect the efficacy of therapy, for example, by changing theintensity of stimulation perceived by patient 14. Accordingly, aposition of leads 16A, 16B relative to a target tissue site mayrepresent a patient parameter value that may be associated with atherapy program. Upon detecting lead 16A, 16B movement relative to thetarget tissue site, a therapy program may be adjusted.

Although illustrated in FIG. 2 as including a single sensor 40, systemsaccording to the invention may include any number of sensors 40. Inexemplary embodiments, the one or more sensors 40 are housed within ahousing (not shown) of IMD 12. However, the invention is not so limited.In some embodiments, one or more sensors 40 are coupled to IMD 12 viaadditional leads 16 (not shown). Such sensors may be located anywherewithin patient 14. In some embodiments, IMD 12 may be coupled tomultiple accelerometer sensors 40 located at various positions withinpatient 14 or on the external surface of patient 14, and processor 34may receive more detailed information about the posture of and activityundertaken by patient 14. For example, accelerometer sensors 40 may belocated within the torso and at a position within a limb, e.g. a leg, ofpatient 14.

In some embodiments, one or more sensors 40 may communicate wirelesslywith IMD 12 instead of requiring a lead to communicate with the IMD. Forexample, sensors 40 located external to patient 14 or implantedseparately from IMD 12 may communicate wirelessly with processor 34,either directly or via programming device 20. In some embodiments, oneor more sensors 40 may be included as part of or coupled to programmingdevice 20.

Moreover, the invention is not limited to embodiments where sensors 40are accelerometers. In some embodiments, one or more sensors 40 may takethe form of, for example, a thermistor, a pressure transducer, orelectrodes to detect thoracic impedance or an electrogram. Such sensors40 may be appropriately positioned within patient 14, or on an externalsurface of the patient, to allow processor 34 to measure a physiologicalparameter of patient 14, such as a skin temperature, an arterial orintracardiac pressure, a respiration rate, a heart rate, or a Q-Tinterval of patient 14.

Processor 34 may also control therapy module 32 to deliver theelectrical stimulation to patient 14 according to records stored withina table stored in memory 36, as described above. In particular,processor 34 may monitor the patient parameter via sensor 40 and selecta therapy program that is associated with the sensed patient parameterfrom the stored table. A range of patient parameters may be associatedwith a single therapy program because patient 14 may find the therapyprogram effective for multiple patient conditions represented by therange of patient parameters.

Processor 34 may transition between therapy programs based on the rateof change in the sensed patient parameter in order to provide a gradualchange to minimize any discomfort to patient 14. For example, if sensor40 is configured to generate a signal indicative of a posture of patient14, and processor 34 determines, based on the signal from sensor 40,that patient 14 is moving from a recumbent posture to a standingposture, processor 34 may control therapy module 32 to transitiontherapy delivery from a program associated with the recumbent posture toa program associated with the sitting posture prior to deliveringtherapy according to a program associated with the standing posturebased on the detected rate of movement between the recumbent andstanding postures. Processor 34 may determine the rate of movement basedon the trend in signals received from sensor 40. The trend may be, forexample, the rate of change of the signal over time, which indicates therates of change in the sensed patient parameter that is indicative ofposture over time.

Depending upon the differences in the therapy parameters of the firstand second programs, patient 14 may notice the shift in therapy from thefirst program to the second program. For example, if the first programis associated with a recumbent posture, while the second program isassociated with a standing posture, an amplitude of stimulation therapymay be greater for the second program. Accordingly, patient 14 maynotice an abrupt change in the stimulation therapy from therapyaccording to the first program to therapy according to the secondprogram. Gradually transitioning between the first and second therapyprograms at a rate that is determined based on the patient's movementbetween the two postures may minimize any noticeable change in therapyto patient 14.

In the embodiment in which patient 14 changes posture from a recumbentposture to a standing posture, if the sensed patient parameter valueassociated with the standing posture is present in the table storedwithin memory 36, processor 34 may select the therapy program associatedwith the standing posture and begin delivering therapy according to theselected therapy program. However, as described above, it may bedesirable to gradually transition between the therapy programsassociated with the recumbent and standing postures. Thus, processor 34may implement one or more intermediate therapy programs as processor 34shifts between the therapy programs associated with the recumbent andstanding postures. The intermediate therapy program may be associatedwith, for example, a sitting posture, which may be a posture between therecumbent and standing postures. Alternatively, processor 34 maygenerate the intermediate therapy program that is based on the therapyprograms within the table of programs stored in memory 36 using one ofthe techniques described below. The recumbent and standing postures areused herein merely as examples. In other embodiments, processor 34 maytransition between therapy programs associated with other patientpostures or other patient parameters.

If the sensed patient parameter is not present in the table or within acertain range of a parameter value in the table, and, thus, notassociated with any stored therapy program, processor 34 may interpolatebetween two programs in the table. In one embodiment, IMD 12 mayreference the table stored in memory 36 to determine whether tointerpolate between two predetermined therapy programs, and to selectthe programs to interpolate between. For example, if therapy deliverymodule 32 is delivering therapy according to a first program, butprocessor 34 determines that the sensed patient parameter has changedand is no longer associated with the first program, processor 34 mayreference the table to determine what program, if any, is associatedwith the current value of the sensed physiological parameter. Becausethe table includes discrete parameter values associated with discreteprograms, processor 34 may select the most closely related program(e.g., the program associated with a parameter value that is the closestto the current patient parameter value out of all the parameter valuesin the table) and deliver therapy according to the most closely relatedprogram. However, the most closely related program may not be the mostoptimal for the patient's current posture or activity level.

According to some techniques of the present invention, processor 34 mayidentify the most closely related program, but rather than deliveringtherapy according to that program, processor 34 may implement analgorithm to interpolate between the current therapy parameters and thetherapy parameters of the most closely related program. The algorithmmay, for example, set forth maximum increments in a particular therapyparameter value, such as increases in the amplitude of electricalstimulation.

In some embodiments, processor 34 may only interpolate between a currenttherapy program and a next closest program based if the sensed patientparameter value not only is not associated with a therapy program, butdiffers from any of the physiological parameter values in the table by athreshold value, which may be for example an absolute or percentagevalue. The threshold value may be set by, for example, a manufacturer ofIMD 12 or a clinician, and controls difference in the parameter valuethat processor 34 identifies as being significant enough to interpolatebetween two therapy programs. If the threshold value is set to a lowvalue, processor 34 may interpolate between the current therapy programand the therapy program that is associated with a patient parametervalue that is closest to the currently sensed patient physiologicalparameter value. Alternatively, the threshold value may be set to ahigher value to minimize the frequency with which processor 34interpolates between two therapy programs.

Processor 34 may monitor the signal from sensor 40 at regular intervalsor substantially continuously in order to determine whether to changethe therapy program by which therapy module 32 delivers electricalstimulation therapy to patient 14. In this way, signals from sensor 40are used in a closed-loop therapy program adjustment techniqueimplemented by processor 34. In other embodiments, a separate processor,rather than processor 34 of IMD 12 may be used to monitor the signalfrom sensor 40 and select therapy programs for implementation based onthe sensed patient parameter or interpolate between two therapyprograms. IMD 12 may include another processor or the separate processormay be included within a separate medical device (either implantedwithin patient 14 or carried external to patient 14). The separateprocessor may provide an input to processor 34 that indicates the sensoroutput or the input to processor 34 may indicate processor 34 shouldimplement a change in therapy program based on the change in the sensor40 output. In addition, in some embodiments, the separate processor mayalso determine a rate of change between adjusting therapy deliverybetween two or more therapy programs and/or interpolate between therapyparameters of two or more programs. Use of a processor separate fromprocessor 34, and especially a separate processor in another medicaldevice, may help conserve power source 41 and extend the useful life ofIMD 12.

IMD 12 also includes a telemetry circuit 38 that allows processor 34 tocommunicate with programming device 20. Processor 34 may receive programselections, therapy parameter adjustments, or other therapy adjustmentsthat override the therapy program selected by processor 34, as well ascommands to initiate or terminate stimulation, from a user, e.g.,patient 14, using programming device 20 via telemetry circuit 38. Insome embodiments, as will be described in greater detail below,processor 34 also communicates with a clinician programmer to providediagnostic information stored in memory 36 to a clinician via telemetrycircuit 38. The diagnostic information may be, for example, the patientparameter values detected by sensor 40. The clinician programmer mayoperate similarly to programmer 20, but the clinician programmer may bemore fully featured, e.g., provide greater control of or interactionwith IMD 12, than programming device 20. Telemetry circuit 38 maycorrespond to any telemetry circuit known in the implantable medicaldevice arts.

Therapy module 32 and processor 34 may be coupled to power source 41.Power source 41 may take the form of a small, rechargeable ornon-rechargeable battery, or an inductive power interface thattranscutaneously receives inductively coupled energy. In the case of arechargeable battery, power source 41 similarly may include an inductivepower interface for transcutaneous transfer of recharge power.

FIG. 3 is a block diagram illustrating an example configuration ofmemory 36 of IMD 12. As illustrated in FIG. 3, memory 36 stores therapyprograms 50, one or more of which processor 34 (FIG. 2) may select tocontrol delivery of stimulation by therapy module 32 (FIG. 2), asdescribed above. Each of the programs includes respective values for aplurality of therapy parameters, such as pulse amplitude, pulse width,pulse rate, and electrode configuration. Processor 34 may select one ormore programs based on a patient parameter value, which may bedetermined based on input from sensor 40. Programs 50 may have beengenerated using a clinician programmer, e.g., during an initial orfollow-up programming session, and received by processor 34 from theclinician programmer via telemetry circuitry 38. In other embodiments,programming device 20 stores programs 50, and processor 34 receivesselected programs from programming device 20 via telemetry circuit 38.

In some embodiments, memory 36 also stores an indication of the currenttherapy parameters 52 used by processor 34 to control delivery ofstimulation by therapy module 32. Current therapy parameters 52 may bethe one or more selected programs, or may reflect modifications to oneor more therapy parameters of the one or more programs based on aninterpolation between two or more stored programs 50. Further, processor34 may determine current therapy parameters 52 based on therapyinformation associated with a detected value of a sensed patientparameter, which is determined via sensor 40.

As described above, patient parameter values table 54 comprises aplurality of records that each include a respective value of a patientparameter and associated therapy information. Processor 34 may alsocollect diagnostic information 56 and store diagnostic information 56within memory 36 for future retrieval by a clinician. Diagnosticinformation 56 may, for example, include selected recordings of theoutput of sensor 40. In exemplary embodiments, diagnostic information 56includes information identifying the time at which patient sensoroutputs occurred, either during operation in a learning mode or assubsequently detected by processor 34. Diagnostic information 56 mayinclude other information or activities indicated by patient 14 usingprogramming device 20, such as changes in symptoms, medication ingestionor other activities undertaken by patient 14. A clinician programmingdevice (not shown in FIGS.) may present diagnostic information 56 to aclinician in a variety of forms, such as timing diagrams, or a graphresulting from statistical analysis of diagnostic information 56, e.g.,a bar graph. Diagnostic information 56 may also include calibrationroutines for each sensor 40 and malfunction algorithms to identifystimulation dysfunctions. Memory 36 may also store interpolationalgorithms 58, which include algorithms employed by processor 34 tointerpolate one or more therapy parameter values between two therapyprograms stored within programs 50. The algorithms in interpolationalgorithms 58 may include both linear and nonlinear algorithms.

FIG. 4 is a block diagram further illustrating programming device 20. Asindicated above, in exemplary embodiments programming device 20 may takethe form of a patient programming device used by patient 14 or aclinician programming device used by a clinician. Patient 14 or theclinician may interact with a processor 60 via a user interface 62 inorder to control delivery of electrical stimulation therapy, e.g.,provide therapy adjustments, if desired. User interface 62 may includedisplay 22 and keypad 24, and may also include a touch screen orperipheral pointing devices as described above. Keypad 24 may include anincrease amplitude button and a decrease amplitude button. Processor 60may also provide a graphical user interface (GUI) to facilitateinteraction with patient 14. Processor 60 may include a microprocessor,a controller, a DSP, an ASIC, an FPGA, discrete logic circuitry, or thelike.

Programming device 20 also includes a telemetry circuit 64 that allowsprocessor 60 to communicate with IMD 12. In exemplary embodiments,processor 60 communicates commands, indications, and therapy adjustmentsmade by patient 14 via user interface 62 to IMD 12 via telemetry circuit64. Telemetry circuit 64 may correspond to any telemetry circuit knownin the implantable medical device arts.

Programming device also includes a memory 66. In some embodiments,memory 66, rather than memory 36 of IMD 12, may store programs 50 andtable 54 to control delivery of electrical stimulation therapy. Memory66 may also include program instructions that, when executed byprocessor 60, cause programming device 20 to perform the functionsascribed to programming device 20 herein. Memory 66 may include anyvolatile, non-volatile, fixed, removable, magnetic, optical, orelectrical media, such as a RAM, ROM, CD-ROM, hard disk, removablemagnetic disk, memory cards or sticks, NVRAM, EEPROM, flash memory, andthe like.

FIG. 5 illustrates an example patient parameter value table 70 that maybe used for closed-loop adjustment of therapy. Table 70 may correspondto table 54 (FIG. 3) stored in memory 36 of IMD 12. As shown in FIG. 5,table 70 includes a plurality of records. Each record contains a 3-axisaccelerometer output, which is an example of a value of a sensed patientparameter, as well as an associated therapy program. In the embodimentshown in FIG. 5, the therapy parameters of each therapy program areshown in table 70, and include an amplitude, a pulse width, a pulsefrequency, and an electrode configuration. Processor 34 may search table70 based on a currently-detected accelerometer output in order to matchtherapy to the current condition, e.g., posture, of patient 14.

Sensor 40 (FIG. 2) of IMD 12 may include the 3-axis accelerometer, whoseoutput may indicate a patient posture. A measured acceleration in eachdirection creates a vector acceleration. Therefore, each accelerometeroutput includes an X variable, a Y variable, and a Z variable. The valueof the accelerometer may be a raw value or a calibrated value equal tothe actual acceleration. The resolution value may be equal to themaximum range of each acceleration component divided by a pre-set size.For example, the maximum range may be 10 volts, and the pre-set size maybe 100. Therefore, the resolution value for each component is 0.1 volts.In some embodiments, each component of the acceleration value may have adifferent resolution value.

With respect to the therapy information, the amplitude is in volts, thepulse width is in microseconds (μs), the pulse frequency is in Hertz(Hz), and the electrode configuration determines the electrodes andpolarity used for delivery of stimulation according to the record. Theamplitude of program table 70 is the voltage amplitude, but otherembodiments may use a current amplitude. In the illustrated example,each record includes a complete set of therapy parameters, e.g., acomplete program, as therapy information. In other embodiments, eachrecord may include one or more individual parameter values, orinformation characterizing an adjustment to one or more parametervalues.

When processor 34 detects an output from the accelerometer, e.g., whenpatient 14 is in a recumbent posture, processor 34 may automaticallydeliver therapy appropriate for the recumbent posture by selectingtherapy program in the table 70 that is associated with an accelerometeroutput that substantially matches or is within a predetermined range ofthe detected accelerometer output. The predetermined range may bedetermined by the clinician or another user, and in some embodiments,may be customized to patient 14. By providing therapy adjustmentsautomatically, IMD 12 provides closed-loop control of the therapyparameters, which may allow patient 14 to avoid having to manuallyadjust the therapy each time a particular patient parameter valueoccurs, e.g., each time the patient engages in a particular activity,activity level or posture. Such manual adjustment of stimulationparameters can be tedious, requiring patient 14 to, for example, depressone or more keys of keypad 24 of programming device 20 (FIG. 1) multipletimes during the patient activity to maintain adequate symptom control.

The look-up table 70, however, is limited in breadth of coverage for allpatient postures because, for example, of limits in the capacity ofmemory 36. Thus, in some cases, processor 34 may detect an output fromthe accelerometer that is not present in table 70 or within apredetermined range of an accelerometer output that is present in table70. In such cases, processor 34 may interpolate between two programs intable 70 to generate a therapy program that best-suits the detectedaccelerometer output.

An example of a technique that processor 34 may employ to interpolatebetween two therapy programs is shown in the flow diagram of FIG. 6.Processor 34 may control therapy module 32 (FIG. 2) to deliver therapyaccording to a therapy program within table 70 (72). For example, asdescribed above, patient 14 may be in a recumbent posture, and processor34 may select a therapy program for implementation by therapy module 32from table 70, where the therapy program is associated with anaccelerometer output indicative of the recumbent posture. Processor 34may monitor the signal from sensor 40 (FIG. 2) to detect a change in thepatient parameter value, i.e., in this example, a change in theaccelerometer output that indicates a change in patient posture (74).While the remainder of the description of FIG. 6 refers to accelerometeroutput, in other embodiments, other patient parameter values may bemonitored by other types of sensors 40 and table 70 may associate othertypes of patient parameter values with therapy programs.

In one embodiment, processor 34 may compare a first accelerometer outputsignal with a second accelerometer output signal that was generated bythe accelerometer after the first signal in order to determine whetherthe patient posture changed. In another embodiment, processor 34 maydetermine whether there was a patient posture change based on theposture levels associated with the accelerometer signals, rather thanmerely comparing the first and second signals. In some cases, processor34 may detect a posture change based on any output from an accelerometeror an accelerometer signal (e.g., an amplitude) that exceeds a certainthreshold, because the accelerometer output typically indicatesmovement, and thus, may suggest patient movement. Other techniques fordetermining whether there was a change in patient posture based on theoutput of an accelerometer may be used.

If the signal from sensor 40 indicates there has not been a change inaccelerometer output, therapy module 32 continues delivering therapyaccording to the therapy program associated with the accelerometeroutput in table 70 (72). If the signal from sensor 40 indicates theaccelerometer output has changed, processor 34 may reference table 70 todetermine whether the new accelerometer output is present in table 70(76). The accelerometer output may indicate that a patient posture haschanged, and that the currently implemented therapy program may not beas effective as other therapy programs. Thus, processor 34 may refer totable 70 to determine whether the new posture, as indicated by theaccelerometer output, is associated with a stored therapy program. Ifthe current accelerometer output is present in table 70, processor 34selects the new therapy program and controls therapy module 32 todeliver therapy according to the therapy program associated with thecurrent accelerometer output in table 70 (72).

If the new accelerometer output is not present in table 70, processor 34finds the closest matching accelerometer output in table 70 in order toidentify the closest matching therapy program (78) relative to thetherapy program currently implemented by therapy module 32. Identifyingthe closest matching therapy program may help the processor 34 determinea range for therapy parameters of an interpolated program that may beeffective for the patient's new posture. For example, referring to table70 in FIG. 5, if the accelerometer output is [X1.5, Y1.5, Z1.5], whichis midway between the accelerometer outputs [X1, Y1, Z1] and [X2, Y2,Z2] that are included in table 70, and the therapy program currentlyimplemented by therapy module 32 is program 1 (shown in FIG. 5),processor 34 identifies accelerometer output [X2, Y2, Z2] as the closestmatching patient parameter value. Alternatively, if the accelerometeroutput is [X1.5, Y1.5, Z1.5], and the therapy program currentlyimplemented by therapy module 32 is program 2, processor 34 identifiesaccelerometer output [X1, Y1, Z1] as the closest matching patientparameter value.

After identifying the closest matching accelerometer output in table 70and the associated therapy program (78), processor 34 may interpolatebetween the current therapy program and the program associated with theclosest matching accelerometer output (80). Thus, in the example inwhich processor 34 identifies accelerometer output [X2, Y2, Z2] as theclosest matching patient parameter value, processor 34 interpolatesbetween therapy programs 1 and 2 to generate an intermediate therapyprogram that is best-suited to the new accelerometer output [X1.5, Y1.5,Z1.5] (80). Processor 34 may then control therapy module 32 to delivertherapy according to the interpolated intermediate therapy program.Processor 34 may continue to monitor the signal from sensor 40 to detectwhen the patient parameter changes (74), and adjust the therapy programor interpolate the therapy program as necessary to address the patientposture changes. In some cases, processor 34 may interpolate between aninterpolated program and a stored therapy program, e.g., if thecurrently implemented therapy program is an interpolated program.

Therapy module 32 may deliver therapy according to an interpolatedprogram during a transition between two programs within table 70 orinstead of delivering therapy according to one of the stored programs oftable 70. For example, the new accelerometer output [X1.5, Y1.5, Z1.5]may reflect that patient 14 is in the midst of changing postures betweenthe posture associated with accelerometer output [X1, Y1, Z1] to theposture associated with accelerometer output [X2, Y2, Z2]. That is,because processor 34 monitors the accelerometer output at regularintervals or substantially continuously, processor 34 may determine anaccelerometer output that reflects a patient posture that is incidentalto movement between two patient postures. As one example, ifaccelerometer output [X1, Y1, Z1] is associated with a recumbent postureand accelerometer output [X2, Y2, Z2] is associated with a sittingposture, accelerometer output [X1.5, Y1.5, Z1.5] may be associated witha posture midway between a recumbent and sitting posture (e.g., a“reclined” posture). Accordingly, when processor 34 determines that theaccelerometer output from sensor 40 is [X1.5, Y1.5, Z1.5], processor 34may merely be detecting an accelerometer output that is the result ofpatient movement, not an actual posture that will be maintained bypatient 14 for a significant amount of time (e.g., more than oneminute). However, in order to provide a relatively smooth transitionbetween the therapy program associated with the accelerometer output[X1, Y1, Z1] and [X2, Y2, Z2], processor 34 may interpolate anintermediate program that provides effective therapy to patient 14 forthe intermediate posture associated with accelerometer output [X1.5,Y1.5, Z1.5]. In some cases, however, patient 14 may maintain the“intermediate” posture.

As another example of how therapy module 32 may deliver therapyaccording to an interpolated program during a transition between twoprograms stored within table 70, a change in accelerometer output to theoutput [X1.5, Y1.5, Z1.5] may suggest that patient 14 is in the midst ofchanging postures between the posture associated with accelerometeroutput [X1, Y1, Z1] to the posture associated with accelerometer output[X2, Y2, Z2]. However, subsequent accelerometer signals may indicatethat patient 14 returned to the posture associated with accelerometeroutput [X1, Y1, Z1], rather than changing to the posture associated withaccelerometer output [X2, Y2, Z2]. Accordingly, in that example,processor 34 may deliver therapy according to the interpolated programuntil processor 34 detects another accelerometer output change, e.g.,the change indicating that patient 14 returned to the posture associatedwith accelerometer output [X1, Y1, Z1], at which time, processor 34 mayreference table 70 and deliver therapy according to program 1, which isassociated with the accelerometer output [X1, Y1, Z1]. The interpolatedprogram may provide a better fit for the “intermediate” posture, in thesense that the posture is between two postures present in table 70. Insome cases, delivery of therapy according to the interpolated programmay provide a more efficient use of power in addition to a better fit,as compared to delivering therapy according to a program associated witha patient posture that patient 14 does not assume (in the example,program 2 associated with accelerometer output [X2, Y2, Z2]).

FIGS. 7A-7C illustrate an embodiment of a technique for interpolatingbetween therapy programs 1 and 2 (shown in the table 70 of FIG. 5). FIG.7A illustrates a first electrode combination on leads 16 (FIG. 2), whichare coupled to therapy module 32. The electrode combination shown inFIG. 7A is a therapy parameter of therapy program 1, and the anode andcathode are both in the (3+, 3−) location, respectively, as indicated intable 70. In particular, electrode 30C of lead 16A is the anode andelectrode 31C of lead 16B is the cathode of the electrode combination.As provided in table 70, therapy program 2 includes an electrodecombination in which the anode and cathode are in the (5+, 5−)locations, respectively. As FIG. 7B illustrates, the electrode 30E oflead 16A is the anode and electrode 31E of lead 16B is the cathode inthe electrode combination of therapy program 2.

In one embodiment, in order to interpolate between therapy programs 1and 2, processor 34 implements an algorithm that determines an electrodecombination that is intermediate to the electrode combinations oftherapy program 1 (FIG. 7A) and therapy program 2 (FIG. 7B). As oneexample, processor 34 may implement an algorithm that linearlyinterpolates between the therapy parameters of therapy programs 1 and 2.As applied to the electrode combination therapy parameter, processor 34may determine that the new accelerometer output [X1.5, Y1.5, Z1.5] isapproximately halfway between the accelerometer outputs associated withtherapy programs 1 and 2. Based on a linear interpolation technique,processor 34 may interpolate a program including an electrodecombination approximately midway between the combinations shown in FIGS.7A and 7B. FIG. 7C illustrates an example of an electrode combinationthat is approximately midway between the combinations of therapyprograms 1 and 2. In particular, the interpolated program includes anelectrode combination that includes an anode and cathode in a (4+, 4−)location, whereby electrode 30D of lead 16A is the anode and electrode31D of lead 16B is the cathode.

As an example, processor 34 may use a table of possible electrodecombinations arranged according to their axial positions on one or moreleads may be used to identify an intermediate electrode combination forthe purpose of interpolating between two programs. Such a table may bestored in memory 36. In some embodiments, a number of possible electrodecombinations, including (4+, 4−), may be present in such a table between(3+, 3−) and (5+, 5−). Other possible combinations between (3+, 3−) and(5+, 5−) may include changes in the relative location or orientation ofanodes and cathodes, e.g., (4−, 4+), and/or additional anodes andcathodes. In some cases, such a table may be generated, culled, orparsed based on user input and/or characteristics of the electrodecombinations of programs 1 and 2. For example, in some embodiments, theselection of an intermediate electrode combination by processor 34 maybe limited by the relative location or orientation of anodes andcathodes, or the number of electrodes or type of combination, e.g.,bipole, guarded cathode, or tranverse tripole.

Processor 34 may implement a linear interpolation algorithm fordetermining the therapy parameters of the interpolated program otherthan the electrode combination. For example, in the embodiment in whichthe accelerometer output is [X1.5, Y1.5, Z1.5] and the therapyparameters include a frequency of electrical stimulation signals, asshown in table 70 (FIG. 5), processor 34 may select a frequency that ismidway between the frequencies of therapy programs 1 and 2. With theexample frequencies provided in table 70, processor 34 may select afrequency of about 30 Hz for the interpolated program.

In other embodiments, processor 34 may implement an algorithm thatfollows a nonlinear interpolation technique. For example, if patient 14is afflicted with lower back pain that is intensified in a sittingposition, and therapy program 1 is associated with a recumbent postureand therapy program 2 is associated with a sitting posture in whichpatient 14 feels a significant increase in pain as compared to therecumbent posture, the algorithm may consider the nonlinear increase inpain levels to interpolate between therapy programs 1 and 2. In oneembodiment, rather than following a strictly linear interpolation inwhich processor 34 selects an electrode combination that isapproximately midway between the combinations for therapies 1 and 2,processor 34 may implement a nonlinear algorithm and select theelectrode combination associated with program 2 (shown in FIG. 7B). Thenonlinear algorithm may reflect a consideration that although thepatient posture indicated by the accelerometer output of [X1.5, Y1.5,Z1.5] is approximately midway between the accelerometer outputsassociated with therapy programs 1 and 2, the pain level associated withthe patient posture is likely to be more than half the pain treated byprogram 2. Similar nonlinear interpolation techniques may be employedfor determining the other therapy parameters of an interpolated program,such as the amplitude, pulse width, and frequency of electricalstimulation.

Processor 34 may also implement a linear interpolation algorithm or anonlinear interpolation algorithm to determine the therapy parameters,such as voltage or current amplitude, pulse width or pulse frequency ofelectrical stimulation, for the intermediate program. The shifting ofstimulation energy between two programs, e.g., between the electrodecombinations of FIGS. 7A and 7C may be implemented via any suitabletechnique. In one embodiment, processor 34 provides instructions thatcause therapy module 32 to time-interleave stimulation energy betweenthe electrode combinations of FIGS. 7A and 7C, as described incommonly-assigned U.S. Pat. No. 7,519,431 to Steven Goetz et al.,entitled, “SHIFTING BETWEEN ELECTRODE COMBINATIONS IN ELECTRICALSTIMULATION DEVICE,” and issued on Apr. 14, 2009, the entire content ofwhich is incorporated herein by reference. In the time-interleaveshifting embodiment, the amplitudes of the first and second electrodecombinations (FIGS. 7A and 7C, respectively) are ramped downward andupward, respectively, in incremental steps until the amplitude of thesecond electrode combination reaches a target amplitude. The incrementalsteps may be different between ramping downward or ramping upward. Theincremental steps in amplitude can be of a fixed size or may vary, e.g.,according to an exponential, logarithmic or other algorithmic change.When the second electrode combination reaches its target amplitude, orpossibly before, the first electrode combination can be shut off.

In another embodiment, shifting electrical stimulation and inparticular, the current, between two electrode combinations ofrespective therapy programs is achieved by reducing an amplitudedelivered to an electrode of one combination relative to the increase inamplitude an electrode of another combination. In such embodiments,therapy module 32 (FIG. 2) may include at least two current sources. Forexample, to shift between therapy program 1 (FIG. 7A) and aninterpolated therapy program (FIG. 7C), the amplitude of currentprovided to electrode 30C on lead 16A may be reduced as the amplitude ofcurrent provided to electrode 30D on lead 16A is increased. Thereduction in amplitude of current provided to electrode 30C may beproportionate to the increase in amplitude of current provided toelectrode 30D. It may be desirable to maintain the current at arelatively consistent perceptual intensity for patient 14 in order toprevent the current from exceeding a maximum threshold for patient 14,above which, patient 14 may feel pain or discomfort.

The rate of shifting between two therapy programs, whether the twotherapy programs are interpolated programs or programs stored in memory36, may be determined based on the rate of change of the patientparameter value. FIG. 8 is a flow diagram illustrating one technique fordetermining a rate of change between which processor 34 may control thechange in therapy between two therapy programs.

Processor 34 stores a first patient parameter value in memory 36 (90),such as within the current parameters 52 section (FIG. 3) of memory 36.The first patient parameter value may be, for example, the currentparameter value associated with the therapy program currentlyimplemented by therapy module 32. The first patient parameter value isnot necessarily permanently stored in memory 36, but rather, in someembodiments, memory 36 may include a buffer in which the first patientparameter value may be temporarily stored. Processor 34 monitors thesignal from sensor 40 and determines whether the patient parameter valuechanges (92). Upon detecting a change in the patient parameter value toa second value, processor 34 may store the second patient parametervalue in memory 36 (e.g., a buffer within memory 36) (94) along with thefirst patient parameter value.

Processor 34 may then determine a rate of change of the patientparameter value between the first and second values over time (96). Forexample, processor 34 may determine the duration of time between theoccurrence of the first and second parameter values, such as bydetermining the difference in time in which the first and secondparameter values were each stored in memory 36, and divide thedifference between the first and second parameter values by thedetermined duration in time. In other words, processor 34 “plots” theparameter values over time and determines the slope in the plot betweenthe first and second parameter values. As applied to an accelerometeroutput, e.g., an electrical signal, processor 34 may determine a rate ofchange of the amplitude of the electrical signal over time in order todetermine the rate of change of the patient parameter value. In thisway, the electrical signal from an accelerometer may be directly used todetermine a rate of adjusting therapy between two or more therapyprograms. Output of other sensors may also be directly used by processor34 to determine a rate of changing between two therapy programs.

After determining the rate of change between the first and secondparameter values over time (96), processor 34 may control therapy moduleto shift between a therapy program associated with the first patientparameter value to a therapy program associated with the second patientparameter value (either from table 70 or interpolated based on programswithin table 70) based on the determined rate of change. In embodimentsin which electrical stimulation is shifted between two electrodes viainterleaving signals, the signals may be interleaved via the determinedrate of change. In embodiments in which electrical stimulation is rampedup and down between two electrodes, the determined rate of change maydetermine the rate at which the ramping of current is performed.

In other embodiments, processor 34 may utilize a rate of change to shiftbetween two therapy programs that is based on the rate of change betweenthe first and second patient parameter values, but is not proportionateto the rates of change. For example, processor 34 may determine the rateof change between the first and second patient parameter values andutilize a look-up function to find a corresponding rate of change forshifting between two therapy programs. The former approach of basing therate of change for shifting between two therapy programs on the rate ofchange between two patient parameter values, rather than adopting therate of change between the patient parameter values, may be useful forpersonalizing the rate of change to a particular patient. In some cases,different patients may prefer different techniques for shifting betweentwo therapy programs. Accordingly, a clinician may determine what apatient's preference as to the rate of change for shifting between twoprograms and how it is related to the rate of change between twoparameter values. The patient's preference as to the rate of change forshifting between two programs may be correlated to a rate of changebetween two patient parameter values during a trial period, prior toprogramming IMD 12 for delivery of chronic therapy.

In some embodiments, the rate of adjusting between two therapy programsmay be based on a rate of change between two or more patient parametervalues. For example, an average or mean of a first rate of change basedon a first patient parameter value and a second rate of change based ona second patient parameter value may determine the actual rate of changeimplemented by processor 34 to shift between two therapy programs.Alternatively, the first rate of change may be validated based on thesecond rate of change (i.e., is the second rate of change substantiallysimilar to the first rate of change?). In one embodiment, the first rateof change may be based on patient posture, which may be determined basedon one or more accelerometer signals, while a second rate of change isbased on another physiological parameter that varies as a function ofpatient activity (e.g., respiration rate, heart rate, etc.). In anotherembodiment, both the first and second rates of change may be based onpatient posture, where the first rate of change is based on a signalfrom a first accelerometer and the second rate of change is based on asignal from a second accelerometer. Use of more than one patientparameter to determine a rate of adjusting between therapy programs mayprovide a robust algorithm for determining the rate of change (or“adjustment”). In other embodiments, a rate change of any number ofpatient parameters may be considered when determining an actual rate foradjusting between two or more therapy programs.

When delivering therapy from IMD 12 based on therapy information/patientparameter value associations, there may be a delay, or “lag,” prior toidentifying a substantially constant patient parameter value because thepatient parameter value may change as patient 14 transitions from onephysiological condition to another. For example, when patient 14transitions from a recumbent posture to a standing posture, a largenumber of patient parameter values that are changing may be detectedwhen patient 14 is in a posture between the recumbent and standingpostures. Thus, when the patient parameter is rapidly changing, e.g.,when the patient is quickly transitioning between activities orpostures, the therapy may be inappropriate for a short period of timeprior to identifying the correct therapy information. Inappropriatetherapy may cause, for example, patient discomfort. As described incommonly-assigned U.S. Patent Application Publication No. 2007/0150029,entitled, “CLOSED-LOOP THERAPY ADJUSTMENT” and filed on Dec. 1, 2006,IMD 12 may instead deliver a predetermined, default, therapy according aknown safe mode program, or suspend therapy, during times in which thepatient parameter is rapidly and/or transiently changing in order toavoid delivering inappropriate therapy. The safe mode is a set ofparameters that is known to provide a safe and comfortable therapy topatient 14 from IMD 12. For example, the safe mode for an implantedelectrical stimulator may be to set the stimulation amplitude to 0volts. This would effectively turn off the stimulation and remove anyundesirable side effects of the therapy.

For some therapies and patients, however, turning off the therapy maynot be safe or comfortable. In the example of an implantedneurostimulator, the safe mode for patient 14 may be a specificcombination of therapy parameters that yield a safe and comfortabletherapy setting. In some embodiments, the safe mode is a preconfiguredsetting or a rollback to a last or last-known safe and comfortabletherapy state. For an implantable drug delivery device, the safe modesetting may involve a user-predefined rate which takes into account thepossibilities of drug concentration change, tube-set, and/or othervariables.

In some embodiments, the safe mode may be defined by allowing patient14, a clinician, a caregiver, or another qualified individual to saveone or more safe therapy configurations that provide patient 16 withsafe and comfortable therapy. In other embodiments, IMD 12 may determinethe therapy parameters of the safe mode, such as by implementing analgorithm that configures the safe mode based on a last known therapyprogram, which includes one or more therapy parameters, that yieldedsafe and comfortable therapy to patient 16. Patient 16, a clinician, acaregiver, or another qualified individual may have the ability torollback to any of the safe mode configurations for IMD 12 as desired.

The safe mode may be patient, therapy, and/or clinician specific. Insome embodiments, one safe mode configuration may be used for allpatients who receive a certain type of treatment. For example, the safemode for a drug delivery device may involve suspending drug delivery. Inthis embodiment, the patient may be alerted when IMD 12 enters safe modeand may be instructed to take oral medications until therapy isrestored. In other embodiments, a clinician may use a specific safe modefor all patients. For example, the safe mode may be set to fifty percentof a last-known therapy. In yet other embodiments, the safe mode may bespecific to the individual patient 14 and customizable based on theneeds and symptoms of patient 14.

For example, according to the example of FIG. 9, processor 34 senses theone or more patient parameter values (100). Processor 34 then determineswhether the patient parameter values are transient or stable (102). Forexample, processor 34 may determine whether the rate of change of thepatient parameter values exceeds a threshold.

If the patient parameter is transient, e.g., rapidly changing, processor34 controls delivery of therapy according to predetermined, defaulttherapy information, which may include low values for therapy parameterssuch as amplitude, pulse width, or pulse rate, for a predeterminedperiod of time (104). In other embodiments, the predetermined, defaulttherapy information may cause processor 34 to suspend delivery oftherapy for a period of time. The predetermined period of time may bechosen such that the patient parameter is likely to be stable at the endof the period, e.g., the patient is likely to be stable within the newposture or activity. If the patient parameter value is stable, e.g., therate of change is below the threshold, processor 34 may control deliveryof therapy according to a therapy program associated with the stablepatient parameter value in the table or generating an intermediateprogram by interpolating between a most recently implemented therapyprogram and a stored therapy program (106).

As previously described, one or more internal and/or external sensorsmay be used to monitor one or more patient parameter values and IMD 12may adjust a therapy program based on a sensed patient parameter value.For example, in the case of SCS that is delivered to treat pain, theposture of the patient may affect the lead placement relative to thetarget tissue sites. The lead placement may affect the efficacy oftherapy delivered to the patient. Thus, in some cases, it may bedesirable to adjust one or more therapy parameters (e.g., switch betweentherapy programs) in order to optimize the efficacy of therapy deliveryin response to patient posture changes. In addition to posture, thepatient parameter may include activity, heart rate, respiration rate,respiratory volume, core temperature, blood pressure, blood oxygensaturation, partial pressure of oxygen within blood, partial pressure ofoxygen within cerebrospinal fluid, muscular activity, arterial bloodflow, electromyogram (EMG), an electroencephalogram (EEG), anelectrocardiogram (ECG) or galvanic skin response.

FIG. 10 is a schematic diagram illustrating external sensing device 110that may be used to monitor a patient parameter, such as a posture,activity level, respiration rate or ECG, of patient 14. Signalsgenerated by external sensing device 110 may be sent to IMD 12 orprogrammer 20 via wireless signals or a wired connection. IMD 12 orprogrammer 20 may implement the signals from external sensing device 110in a closed-loop therapy adjustment technique, as described above.Activity sensing device 110 is an external device that may be attachedto patient 14 via a belt 112. Alternatively, activity sensing device 110may be attached to patient 14 by any other suitable technique, such as aclip that attaches to the patient's clothing, or activity sensing device110 may be worn on a necklace that is worn around the patient's neck ora watch on the patient's wrist. Activity sensing device 110 may includea sensor that generates a signal indicative of patient motion, such asaccelerometer or a piezoelectric crystal. If activity sensing device 110includes a sensor that senses relative motion, such as an accelerometer,it may be desirable to attach sensing device 110 to a torso of patient14 in order to gather the most relevant activity data.

In addition to or instead of a motion sensor, external sensing device110 may include or be coupled to a sensor that generates a signal thatindicates a physiological parameter that varies as a function of patientactivity, which may be used to determine an activity level of patient14. As described above, suitable physiological parameters include heartrate, respiratory rate, ECG morphology, respiration rate, respiratoryvolume, core temperature, a muscular activity level, subcutaneoustemperature or electromyographic activity of patient 14. For example, insome embodiments, patient 14 may wear an ECG belt 114 that incorporatesa plurality of electrodes for sensing the electrical activity of theheart of patient 14. The heart rate and, in some embodiments, ECGmorphology of patient 14 may monitored based on the signal provided byECG belt 114. Examples of suitable ECG belts for sensing the heart rateof patient 14 are the “M” and “F” heart rate monitor models commerciallyavailable from Polar Electro. In some embodiments, instead of ECG belt114, patient 14 may wear a plurality of ECG electrodes (not shown inFIG. 10) attached, e.g., via adhesive patches, at various locations onthe chest of patient 14, as is known in the art. An ECG signal derivedfrom the signals sensed by such an array of electrodes may enable bothheart rate and ECG morphology monitoring, as is known in the art.

A respiration belt 116 that outputs a signal that varies as a functionof respiration of the patient may also be worn by patient 14 to monitoractivity to determine whether patient 14 is undertaking activity or achange in posture for which a therapy programming change may bedesirable. Respiration belt 116 may be a plethysmograpy belt, and thesignal output by respiration belt 116 may vary as a function of thechanges is the thoracic or abdominal circumference of patient 14 thataccompany breathing by patient 14. An example of a suitable respirationbelt is the TSD201 Respiratory Effort Transducer commercially availablefrom Biopac Systems, Inc. Alternatively, respiration belt 116 mayincorporate or be replaced by a plurality of electrodes that direct anelectrical signal through the thorax of patient 14, and circuitry tosense the impedance of the thorax, which varies as a function ofrespiration of patient 14, based on the signal. In some embodiments, theECG and respiration belts 114, 116 may be a common belt worn by patient14.

Patient 14 may also wear transducer 118 that outputs a signal as afunction of the oxygen saturation of the blood of patient 14. Transducer118 may be an infrared transducer. Transducer 118 may be located on oneof the fingers or earlobes of patient 14. Each of the types of sensors110, 114, 116, and 118 described above may be used alone or incombination with each other, as well as in addition to or instead ofsensor 40 (FIG. 2) located within IMD 12.

Various embodiments of the invention have been described. However, oneof ordinary skill in the art will understand that various modificationsmay be made to the described embodiments without departing from thescope of the invention. For example, although described with referenceto techniques for automatically populating a table of patient parametervalues and associated therapy programs, the invention is not so limited.Programs may be associated with sensed patient parameter values by anytechnique, including manual programming by, for example, a clinician. Inaddition, although to interpolating between two therapy programs anddetermining a rate of adjusting between two therapy programs wereprimarily described in the embodiments above as being performed byprocessor 34 of IMD 12, in other embodiments processors of otherdevices, such as a processor of programmer 20 (FIG. 1) may interpolatebetween programs and determine a rate of changing between two programs.In addition, the sensors that generate the signals indicative of patientparameter values may be external to patient 14 or implanted withinpatient 14. The use of external sensors or sensors otherwise separatefrom IMD 12 may allow IMDs already implanted within a patient to beretrofit to include the therapy program interpolation and rate ofadjustment features described herein.

These and other embodiments are within the scope of the followingclaims.

1. A method comprising: sensing a first value of a parameter of apatient; delivering therapy to the patient according to a first therapyprogram associated with the first value of the patient parameter;detecting a change from the first value of the patient parameter to asecond value of the patient parameter; determining a first rate of thechange from the first value to the second value of the patientparameter; identifying a second therapy program based on the secondvalue of the patient parameter; determining a second rate based on thefirst rate of the change; and adjusting the delivery of the therapy tothe patient from the first therapy program to the second therapy programat the second rate.
 2. The method of claim 1, wherein the second rate issubstantially equal to the first rate.
 3. The method of claim 1, whereinadjusting the delivery of the therapy to the patient from the firsttherapy program to the second therapy program at the second ratecomprises interpolating at least one intermediate therapy programcomprising at least one therapy parameter between the therapy parametersof the first and second therapy programs and delivering the therapyaccording to the intermediate program prior to delivering the therapyaccording the second therapy program.
 4. The method of claim 3, whereinthe therapy parameter comprises at least one of an electrodeconfiguration, an electrical stimulation pulse rate, an electricalstimulation pulse width, an electrical stimulation current amplitude, afluid delivery dosage, a cycle of therapy delivery, the electricalstimulation current amplitude rate of change, or a fluid delivery rate.5. The method of claim 1, wherein the parameter of the patient comprisesa posture of the patient.
 6. The method of claim 1, wherein detecting achange from the first value of the patient parameter value to the secondvalue comprises: receiving a first signal from an accelerometer, thefirst signal indicating the first value; receiving a second signal fromthe accelerometer; and comparing the first and second signals.
 7. Themethod of claim 6, wherein the accelerometer comprises one or moremulti-axis accelerometers, one or more single-axis accelerometers or acombination of the multi-axis and single-axis accelerometers.
 8. Themethod of claim 1, wherein the sensed patient parameter comprises atleast one of activity, heart rate, respiration rate, respiratory volume,core temperature, blood pressure, blood oxygen saturation, partialpressure of oxygen within blood, partial pressure of oxygen withincerebrospinal fluid, muscular activity, arterial blood flow,electromyogram (EMG), an electroencephalogram (EEG), anelectrocardiogram (ECG) or galvanic skin response.
 9. The method ofclaim 1, wherein the therapy comprises at least one of electricalstimulation therapy or fluid delivery therapy.
 10. The method of claim1, further comprising: determining whether the second value of thepatient parameter is transient based on the first rate; deliveringtherapy according to a safe mode or suspending therapy if the secondvalue is transient; and delivering therapy according to the secondprogram if the second value is not transient.
 11. The method of claim 1,wherein the therapy comprises electrical stimulation therapy andadjusting the delivery of the therapy to the patient from the firsttherapy program to the second therapy program at the second ratecomprises: delivering electrical stimulation to a patient via a firstelectrode combination of the first therapy program; deliveringelectrical stimulation to the patient via a second electrode combinationof the second therapy program on a time-interleaved basis with theelectrical stimulation delivered via the first electrode combination;incrementally increasing an amplitude of the electrical stimulationdelivered via the second electrode combination while the electricalstimulation delivered via the second electrode combination is deliveredon a time-interleaved basis with the electrical stimulation deliveredvia the first electrode combination; and incrementally decreasing anamplitude of the electrical stimulation delivered via the firstelectrode combination while the electrical stimulation delivered via thesecond electrode combination is delivered on a time-interleaved basiswith the electrical stimulation delivered via the first electrodecombination.
 12. The method of claim 1, wherein the therapy compriseselectrical stimulation therapy and adjusting the delivery of the therapyto the patient from the first therapy program to the second therapyprogram at the second rate comprises: delivering electrical stimulationto a patient via a first electrode combination of the first therapyprogram; delivering electrical stimulation to the patient via a secondelectrode combination of the second therapy program; and reducing anamplitude delivered to a first electrode of the first electrodecombination while increasing an amplitude in a second electrode of thesecond electrode combination.
 13. The method of claim 1, wherein theparameter of the patient comprises a first patient parameter, the methodfurther comprising: sensing a third value of a second patient parameter;detecting a change from the third value of the patient parameter to afourth value of the second patient parameter; determining a third rateof change from the third value to the fourth value of the second patientparameter, wherein determining the second rate comprises determining thesecond rate based on the first rate and the third rate.
 14. The methodof claim 13, wherein determining the second rate comprises determiningan average of the first and third rates.
 15. A system comprising: amedical device that is configured to deliver a therapy to a patient; asensor that is configured to sense a parameter of the patient; a memoryconfigured to store a data structure comprising a plurality of values ofthe patient parameter and associated therapy programs, wherein thetherapy programs each comprise at least one therapy parameter; and aprocessor configured to control the medical device to deliver thetherapy to the patient according to a first therapy program associatedwith a first value of a patient parameter detected via the sensor,detect a change from the first value of the patient parameter to asecond value of the patient parameter, determine a first rate of thechange from the first value to the second value of the patientparameter, identify a second therapy program associated with the secondvalue of the patient parameter via the data structure stored within thememory, determine a second rate based on the first rate, and control themedical device to adjust the delivery of the therapy to the patient fromthe first therapy program to the second therapy program at the secondrate.
 16. The system of claim 15, wherein the second rate issubstantially equal to the first rate.
 17. The system of claim 15,wherein the sensor comprises at least one of a physiological parametersensor, one or more multi-axis accelerometers, one or more single-axisaccelerometers, a combination of multi-axis and single-axisaccelerometers, a bonded piezoelectric crystal, a mercury switch or agyro.
 18. The system of claim 15, wherein the patient parametercomprises a posture of the patient.
 19. The system of claim 15, whereinthe patient parameter comprises at least one of activity, heart rate,respiration rate, respiratory volume, core temperature, blood pressure,blood oxygen saturation, partial pressure of oxygen within blood,partial pressure of oxygen within cerebrospinal fluid, muscularactivity, arterial blood flow, electromyogram (EMG), anelectroencephalogram (EEG), an electrocardiogram (ECG) or galvanic skinresponse.
 20. The system of claim 15, wherein the medical devicecomprises at least one of an electrical stimulator or a fluid deliverydevice.
 21. The system of claim 15, wherein the medical device comprisesthe sensor.
 22. The system of claim 15, wherein the sensor is separatefrom the medical device.
 23. The system of claim 15, wherein theprocessor determines whether the second value of the patient parameteris transient based on the first rate, delivers therapy according to asafe mode or suspends therapy if the second value is transient, anddelivers therapy according to the second program if the second value isnot transient.
 24. A non-transitory computer-readable medium comprisinginstructions that cause a processor to: receive input indicating a firstvalue a sensed parameter of a patient; identify a first therapy programassociated with the first value of the patient parameter; delivertherapy to the patient according to the first therapy program; detect achange from the first value of the patient parameter to a second valueof the patient parameter; determine a first rate of change from thefirst value to the second value of the patient parameter; identify asecond therapy program associated with the second value of the patientparameter; determine a second rate based on the first rate of thechange; and adjust the delivery of the therapy to the patient from thefirst therapy program to the second therapy program at the second rate.25. The computer-readable medium of claim 24, wherein the instructionsthat cause the processor to identify the second therapy programassociated with the second value of the patient parameter cause theprocessor to: identify a third value of the patient parameter within adata structure that is closest the second value of the patientparameter, wherein the third value is associated with a third therapyprogram within the data structure; and generate the second therapyprogram by interpolating at least one therapy parameter between therapyparameters of the first and third therapy programs.